#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton* btn=new QPushButton(this);//创建对象
    btn->setText("Hello word");//显示
    //btn->setParent(this);//至于窗口上

    btn->move(100,100);
    this->move(1000,100);
}

Widget::~Widget()
{
    delete ui;
}

